From 838bc9d1351a678c4445db8fa3789117f50bff78 Mon Sep 17 00:00:00 2001 From: tsteven4 <13596209+tsteven4@users.noreply.github.com> Date: Mon, 11 Nov 2024 07:28:20 -0700 Subject: [PATCH] manually trigger attestations (#1379) * use dispatch parameter to include attestation. * restrict attestation to release flavor --- .github/workflows/macos.yml | 10 ++++++++-- .github/workflows/ubuntu.yml | 10 ++++++++-- .github/workflows/windows.yml | 14 ++++++++++---- 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 74894a8d4..14032c6c7 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -8,7 +8,13 @@ on: branches: [ master ] schedule: - cron: '27 4 * * 2' - workflow_dispatch: ~ + workflow_dispatch: + inputs: + attestation: + description: 'Generate attestation for binary artifacts' + required: false + default: false + type: boolean jobs: macos: @@ -99,7 +105,7 @@ jobs: ./tools/ci_script_osx.sh . ${{ matrix.QT_VERSION }} ${{ matrix.GENERATOR }} - name: Generate artifact attestation - if: ( github.event_name == 'push' ) && ( github.ref == 'refs/heads/master' ) && matrix.RELEASE + if: ${{ inputs.attestation && matrix.RELEASE }} uses: actions/attest-build-provenance@v1 with: subject-path: 'gui/GPSBabel-*.dmg' diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index bc065153f..16238c40e 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -8,7 +8,13 @@ on: branches: [ master ] schedule: - cron: '27 4 * * 2' - workflow_dispatch: ~ + workflow_dispatch: + inputs: + attestation: + description: 'Generate attestation for binary artifacts' + required: false + default: false + type: boolean jobs: ubuntu: @@ -111,7 +117,7 @@ jobs: ./testo -p /snap/bin/gpsbabel - name: Generate artifact attestation - if: ( github.event_name == 'push' ) && ( github.ref == 'refs/heads/master' ) + if: ${{ inputs.attestation }} uses: actions/attest-build-provenance@v1 with: subject-path: ${{ steps.build-snap.outputs.snap }} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index bd3282995..dd90c3ede 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -8,7 +8,13 @@ on: branches: [ master ] schedule: - cron: '27 4 * * 2' - workflow_dispatch: ~ + workflow_dispatch: + inputs: + attestation: + description: 'Generate attestation for binary artifacts' + required: false + default: false + type: boolean jobs: @@ -103,7 +109,7 @@ jobs: PNAME=./bld/gui/package/gpsbabel.exe GBTEMP=./gbtemp ./test_encoding_utf8 2>&1 - name: Generate artifact attestation - if: ( github.event_name == 'push' ) && ( github.ref == 'refs/heads/master' ) && matrix.RELEASE + if: ${{ inputs.attestation && matrix.RELEASE }} uses: actions/attest-build-provenance@v1 with: subject-path: 'bld/gui/GPSBabel-*-Setup.exe' @@ -124,6 +130,6 @@ jobs: with: name: Windows_Installer ${{ join(matrix.*) }} path: | - ./bld/gui/GPSBabel-*-Setup.exe - ./bld/gui/GPSBabel-*-Manifest.txt + bld/gui/GPSBabel-*-Setup.exe + bld/gui/GPSBabel-*-Manifest.txt retention-days: 7 -- 2.30.2